[17.0][IMP]queue_job: only subscribe job creator if indicated via boolean method#865
Conversation
|
Hi @guewen, |
53b1975 to
f35df77
Compare
|
hi @guewen, any chance you see this a good improvement to the module? |
|
@GuillemCForgeFlow why is it not sufficient for you to override |
@sbidoul, the problem is that the user assigned to the job will always be added anyway: https://github.com/OCA/queue/blob/17.0/queue_job/models/queue_job.py#L359. There may be cases for which we don't want that to happen. |
Ah yes. How about this? def _subscribe_job_creator(self) -> bool
"""Whether the user that created the job should be subscribed to the job, in addition to users determined by `_subscribe_users_domain`""" |
…ethod We add the `_subscribe_job_creator` method in `queue.job` which will return True for the cases where we want to subscribe the job creator, False otherwise.
f35df77 to
5487166
Compare
|
@sbidoul changes applied, thank you for the feedback 🙂 👍🏿 |
|
hi @guewen, I'd appreciate it if you have the time to review this small improvement 🙂 |
|
@sbidoul perhaps we can get this merged? I'll take care of the fws 👌🏿 |
|
/ocabot merge patch Thanks! |
|
This PR looks fantastic, let's merge it! |
|
Congratulations, your PR was merged at 1acf4c1. Thanks a lot for contributing to OCA. ❤️ |
We add the
_subscribe_job_creatormethod inqueue.jobwhich will return True for the cases where we want to subscribe the job creator, False otherwise.cc @ForgeFlow